package club.hicode.daydayup.rabbitmq.direct;

import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Service;

import static club.hicode.daydayup.rabbitmq.MQConst.DIRECT_QUEUE;

/**
 * MQ 的接收者
 *
 * @author Liu Chunfu
 * @date 2018-05-08 上午9:35
 **/
@Slf4j
@Service
public class DirectReceive {

    @RabbitListener(queues = DIRECT_QUEUE)
    public void receiveMsg(String msg) {
        log.error("从队列:{}中接收接收到信息:{}", DIRECT_QUEUE, msg);
    }

}
